import request from '@/utils/request'

// 获取验证码
export const reqSendCode = (phone) => {
  return request({
    method: 'GET',
    url: `/user/passport/sendCode/${phone}`,
  })
}
// 用户注册
export const reqRegister = (data) => {
  return request({
    method: 'POST',
    url: '/user/passport/register',
    data,
  })
}
// 用户登录
export const reqLogin = (phone, password) => {
  return request({
    method: 'POST',
    url: '/user/passport/login',
    data: {
      phone,
      password,
    },
  })
}
// 退出登录
export const reqLogOut = () => {
  return request({
    method: 'GET',
    url: '/user/passport/logout',
  })
}
